package com.sun.service;

import com.github.pagehelper.PageInfo;
import com.sun.entity.User;

import java.util.List;

public interface UserService {
	User selectUserById(Long id) throws Exception;

	List<User> getUserList() throws Exception;

	User updateByid(Long id, User updatedUser) throws Exception;

	void deleteByid(Long id);

	// 通用mapper方法
	int updateUser(User user);
	int addUser(User user);
   /*登录*/
	User login(String name,String password);
	/*查询单个用户*/
	User showDetail(Long id);
	/*删除单个用户*/
	int userDelByid(Long id);
	PageInfo<User> getUserByPage(int pageNum , int pageSize);



	PageInfo<User> searchUsersPage(String searchTerm, int pageNum, int pageSize);

    User selectUserByname(String username);

	int batchDeleteUsers(List<Long> ids);
}